package com.ilxqx.framework.system.config;

import com.qiniu.storage.BucketManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 文件上传静态配置
 * @author venus
 */
@Component
public class StaticUploadConfigProperties {

	/**
	 * 七牛静态资源域名
	 */
	public static String domain;

	/**
	 * 七牛存储空间名
	 */
	public static String bucket;

	/**
	 * 七牛资源管理对象
	 */
	public static BucketManager bucketManager;

	@Autowired
	public StaticUploadConfigProperties(UploadConfigProperties uploadConfigProperties, QiNiuConfigProperties qiNiuConfigProperties, BucketManager bucketManager) {
		StaticUploadConfigProperties.domain = uploadConfigProperties.getDomain();
		StaticUploadConfigProperties.bucket = qiNiuConfigProperties.getBucket();
		StaticUploadConfigProperties.bucketManager = bucketManager;
	}

}
